#include<stdio.h>
#include<string.h>
int bin_search(int arr[],int left,int right,int key)
{
	while(left<=right)
	{
		int mid=(left+right)/2;
		if(arr[mid]==key)
		{
			return mid;
		}
	    if(arr[mid]>key)
		{
			right=mid-1;
		}
		else
		{
			left=mid+1;
		}
	}
		return -1;
}




int main()
{
	int arr[6]={1,2,3,4,5,6};
	int key=0;
	int left=0;
	int right=sizeof(arr)/sizeof(arr[0])-1;
	scanf("%d",&key);
	int result= bin_search(arr,left,right,key);
	printf("%d ",result);
	return 0;
}
